package org.springframework.core.logger;

/**
 * @author:刘仁有
 * @desc:
 * @email:953506233@qq.com
 * @data:2019/11/11
 */
public class LoggerFactory {
    public static AbstractLogger getLogger(Class<?>clazz){
        AbstractLogger errorLogger = new ErrorLogger(AbstractLogger.ERROR,clazz);
        AbstractLogger fileLogger = new DebugLogger(AbstractLogger.DEBUG,clazz);
        AbstractLogger consoleLogger = new InfoLogger(AbstractLogger.INFO,clazz);
        errorLogger.setNextLogger(fileLogger);
        fileLogger.setNextLogger(consoleLogger);
        return errorLogger;
    }
}
